package com.weixingtu.commuterCar.bean;

import java.util.Objects;

public class Site {
    private int objId;
    private int siteId;
    private String siteName;
    private double lat;//wgs84纬度
    private double lng;//wgs84经度
    private double costTime;//到下一站的时间
    private int lineId;
    private String lineName;

    public Site() {
    }

    public Site(int objId, int siteId, String siteName, double lat, double lng, double costTime, int lineId, String lineName) {
        this.objId = objId;
        this.siteId = siteId;
        this.siteName = siteName;
        this.lat = lat;
        this.lng = lng;
        this.costTime = costTime;
        this.lineId = lineId;
        this.lineName = lineName;
    }

    @Override
    public String toString() {
        return "Site{" +
                "objId=" + objId +
                ", siteId=" + siteId +
                ", siteName='" + siteName + '\'' +
                ", lat=" + lat +
                ", lng=" + lng +
                ", costTime=" + costTime +
                ", lineId=" + lineId +
                ", lineName='" + lineName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Site site = (Site) o;
        return objId == site.objId &&
                siteId == site.siteId &&
                Double.compare(site.lat, lat) == 0 &&
                Double.compare(site.lng, lng) == 0 &&
                Double.compare(site.costTime, costTime) == 0 &&
                lineId == site.lineId &&
                Objects.equals(siteName, site.siteName) &&
                Objects.equals(lineName, site.lineName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(objId, siteId, siteName, lat, lng, costTime, lineId, lineName);
    }

    public int getObjId() {
        return objId;
    }

    public void setObjId(int objId) {
        this.objId = objId;
    }

    public int getSiteId() {
        return siteId;
    }

    public void setSiteId(int siteId) {
        this.siteId = siteId;
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public double getCostTime() {
        return costTime;
    }

    public void setCostTime(double costTime) {
        this.costTime = costTime;
    }

    public int getLineId() {
        return lineId;
    }

    public void setLineId(int lineId) {
        this.lineId = lineId;
    }

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }
}
